AppState

@JsonClass(generateAdapter = true)
data class AppState(val locationPermission: LocationPermission, val notificationPermission: NotificationPermission, val batteryLevel: Int, val lastRuleUpdate: Instant?, val viewState: ViewState, val foregroundServiceEnabled: Boolean) : Parcelable

AppState stores the state of the Application when the event(Entry/Exit) was triggered by the SDK

Example:

AppState(locationPermission=ALWAYS,
batteryLevel=43,
lastRuleUpdate=2023-11-15T00:48:09.350Z,
viewState=FOREGROUND_SERVICE,
foregroundServiceEnabled=true)

Constructors

Link copied to clipboard
constructor(locationPermission: LocationPermission, notificationPermission: NotificationPermission, batteryLevel: Int, lastRuleUpdate: Instant?, viewState: ViewState, foregroundServiceEnabled: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Battery level of the device when the event was triggered

Link copied to clipboard

true if notification is set by App before starting the Geo-trigger/Tempo

Link copied to clipboard
val lastRuleUpdate: Instant?

Time when the last rule download occurred from SDK

Link copied to clipboard
val locationPermission: LocationPermission

level of permission granted for Location Access like(always/while_using/denied/restricted)

Link copied to clipboard

Notification permission access(granted/denied)

Link copied to clipboard

App running in background/foreground/foreground_service mode

Functions

Link copied to clipboard
fun toJson(): String

Convert this object to JSON.

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)